package com.ecommerceWeb.common;

import org.springframework.beans.BeansException;


import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;

import com.eCommerce.server.corebackend.dao.DAOController;
import org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.Serializable;
import org.apache.commons.logging.LogFactory;
import org.jdom.Document;
import org.jdom.Element;
import org.jdom.JDOMException;
import org.jdom.input.SAXBuilder;
import org.jdom.xpath.XPath;
import org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean;
public class EcommerceBaseController implements
ApplicationContextAware {

	private ApplicationContext applicationContext;
	private DAOController daoController;
	private String myMessage;
	public Object getMyBean(String beanName)  
	{
		return getApplicationContext().getBean(beanName);
	}

	public ApplicationContext getApplicationContext() {
		return applicationContext;
	}
	public void setApplicationContext(ApplicationContext arg0)
			throws BeansException {
		// TODO Auto-generated method stub
		this.applicationContext=arg0;
		
	}

	public void setDaoController(DAOController daoController) {
		this.daoController = daoController;
	}

	public DAOController getDaoController() {
		return daoController;
	}

	public void setMyMessage(String myMessage) {
		this.myMessage = myMessage;
	}

	public String getMyMessage() {
		return myMessage;
	}

}
